//
// Copyright 2017 Google Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions://
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

@import "./common";
@import "../packages/mdc-button/mdc-button";
@import "../packages/mdc-card/mdc-card";
@import "../packages/mdc-checkbox/mdc-checkbox";
@import "../packages/mdc-form-field/mdc-form-field";
@import "../packages/mdc-icon-button/mdc-icon-button";
@import "../packages/mdc-list/mdc-list";
@import "../packages/mdc-ripple/mdc-ripple";

.hero {
  height: auto;
  padding: 24px;
}

.demo-card-collection {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  padding: 0 24px;
}

.demo-card-toggles {
  margin: 24px;
  padding: 24px;
  text-align: center;
}

//
// Card container
//

.demo-card {
  width: 350px;
  margin: 48px;
}

.demo-card--photo {
  width: 200px;
}

//
// Images
//

.demo-card__media {
  background-image: url("/images/1-1.jpg");
}

.demo-card__media--16-9 {
  background-image: url("/images/16-9.jpg");
}

.demo-card__media-content--with-title {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.demo-card__media-title {
  padding: 8px 16px;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%);
  color: white;
}

//
// Book card
//

.demo-card__primary {
  padding: 1rem;
}

.demo-card__title {
  margin: 0;
}

.demo-card__subtitle {
  @include mdc-theme-prop(color, text-secondary-on-background);

  margin: 0;
}

.demo-card__secondary {
  @include mdc-theme-prop(color, text-secondary-on-background);

  padding: 0 1rem 8px 1rem;
}

//
// Headlines card
//

.demo-card-article-group-heading {
  @include mdc-theme-prop(color, text-secondary-on-light);

  padding: 8px 16px;
}

.demo-card-article {
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.demo-card-article__title {
  margin: 0 0 4px 0;
}

.demo-card-article__snippet {
  @include mdc-theme-prop(color, text-secondary-on-light);

  margin: 0;
}

//
// Music card
//

.demo-card--music {
  @include mdc-card-corner-radius(24px 4px);

  @include mdc-rtl {
    @include mdc-card-corner-radius(4px 24px);
  }
}

.demo-card__music-row {
  display: flex;
  border-top-left-radius: inherit;

  @include mdc-rtl {
    border-top-left-radius: 0;
    border-top-right-radius: inherit;
  }
}

.demo-card__media--music {
  width: 110px;
  border-top-left-radius: inherit;

  @include mdc-rtl {
    border-top-left-radius: 0;
    border-top-right-radius: inherit;
  }
}

.demo-card__music-info {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
}

.demo-card__action-buttons--text-only {
  margin-left: 8px;
}

.demo-card__action-icon--star {
  margin-left: 4px;
  margin-right: 4px;
  cursor: pointer;
}
